import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listContract(query) {
  return request({
    url: '/tongyan/contract/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getContract(contractId) {
  return request({
    url: '/tongyan/contract/' + contractId,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addContract(data) {
  return request({
    url: '/tongyan/contract/' +data.projectId,
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateContract(data) {
  return request({
    url: '/tongyan/contract',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delContract(contractId) {
  return request({
    url: '/tongyan/contract/' + contractId,
    method: 'delete'
  })
}
export function readContract(file) {
  const formData = new FormData()
  formData.append('file', file)
  return request({
    url: '/coze/file/upload-and-run',
    method: 'post',
    data: formData,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}

